package com.slt.jvm.mashibing.c4_RuntimeDataAreaAndInstructionSet;

/**
 * 调用的方法 有返回值的情况
 */
public class Hello_03 {
    /**
     *  0 new #2 <com/slt/jvm/mashibing/c4_RuntimeDataAreaAndInstructionSet/Hello_03>
     *  3 dup
     *  4 invokespecial #3 <com/slt/jvm/mashibing/c4_RuntimeDataAreaAndInstructionSet/Hello_03.<init>>
     *  7 astore_1
     *  8 aload_1
     *  9 invokevirtual #4 <com/slt/jvm/mashibing/c4_RuntimeDataAreaAndInstructionSet/Hello_03.m1>
     * 12 istore_2 : 把栈顶元素（m1返回的值，会放到栈顶） 赋值给2号变量i
     * 13 return
     * @param args
     */
    public static void main(String[] args) {
        Hello_03 h = new Hello_03();
        int i = h.m1();
    }

    //加了返回值
    public int m1() {
        return 100;
    }
}
